@extends('layout.home')
@section('title','问题Center')
@section('content')	
<div class="aw-container-wrap">
	<div class="container">
		<div class="row">
			<div class="aw-content-wrap clearfix">
				<div class="col-sm-12 col-md-9 aw-main-content">
					<div class="ad-all clearfix">
						<div id="carousel-example" class="carousel slide" data-ride="carousel">
						    <ol class="carousel-indicators">
						       <li data-target="#carousel-example" data-slide-to="0" class=""></li>
						       <li data-target="#carousel-example" data-slide-to="1" class=""></li>
						       <li data-target="#carousel-example" data-slide-to="2" class="active"></li>
						    </ol>
						    <div class="carousel-inner">
						      	<div class="item">
						           <a href="/" target="_blank"><img alt="" src="/homes/ad/pc/1.jpg"></a>
						        </div>
						       	<div class="item">
						            <a href="/" target="_blank"><img alt="" src="/homes/ad/pc/2.jpg"></a>
						        </div>
						        <div class="item active">
						            <a href="/" target="_blank"><img alt="" src="/homes/ad/pc/3.jpg"></a>
						        </div>
						    </div>
						    <a class="left carousel-control" href="#carousel-example" data-slide="prev">
						    	<span class="glyphicon glyphicon-chevron-left" style="font-size:14px;"></span>
						    </a>
						    <a class="right carousel-control" href="#carousel-example" data-slide="next">
						    	<span class="glyphicon glyphicon-chevron-right" style="font-size:14px;"></span>
						    </a>
						</div>
						<script>
							$(function(){
								$('.carousel').carousel();
							});
						</script>					
					</div>
					<!-- tab切换 -->
					<ul class="nav nav-tabs aw-nav-tabs hidden-xs active">
						<li class="active"><a href="/question/unresponsive">等待回复</a></li>
						<li><a href="/question/new">最新</a></li>
						<h2 class="hidden-xs"><i class="icon icon-wechat" style="font-size:20px;color:#000;"></i> 交流</h2>
					</ul>
					<!-- end tab切换 -->					
					<!-- 问题列表 -->
					<div class="aw-mod aw-explore-list">
						<div class="mod-body">
							<div class="aw-common-list">
							@if(!empty($cards))
							@foreach($cards as $k=>$v)
								<div class="aw-mod aw-explore-list">
									<div class="mod-body">
										<div class="aw-common-list">
											<div class="aw-item" id="aw-item_0">
												<div class="aw-user-imgs">
													<a class="aw-user-name aw-user-name-o hidden-xs" data-id="1" href="/question/qdetail?id={{$v->uid}}" rel="nofollow">
														<img src="{{$v->profile}}" alt="">
														<p>{{$v->username}}</p>
													</a>	
													<div class="userline hidden-xs" id="userline_0">
													</div>
												</div>
												<div class="aw-question-content" id="aw-question-content_0">
													<h4><a href="/question/qdetail?id={{$v->id}}">{{$v->title}}</a></h4>	
												<div class="inner clearfix">
													<div class="inner clearfix question-text" style="color: #666; font-size:13px;">{{$v->content}}
													</div>
													<div class="inner clearfix">
														<span class="text-color-999">{{$v->ccount}} 人关注 • {{$v->rcount}} 个回复 • {{$v->liulan}} 次浏览</span>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							@endforeach
							@else
			                <p class="padding10 text-center">没有内容</p>
			                @endif
						</div>
					</div>
				</div>
				<!-- end 问题列表 -->
				<div class="mod-body col-md-12 clearfix">
					<div class="mod-footer pull-right"></div>
				</div>
			</div>
			<!-- 侧边栏 -->
			<div class="col-sm-12 col-md-3 aw-side-bar hidden-xs hidden-sm">
				<div class="aw-mod aw-text-align-justify">
					<div class="mod-head">
						<a href="/homes/topic/" class="pull-right">更多 &gt;</a>
						<h3>热门文章</h3>
					</div>
					<div class="mod-body">
						<dl>
							<dt class="pull-left aw-border-radius-5">
								<a href="/question/qdetail?id={{$max->id}}"><img alt="" src="/homes/common/topic-mid-img.png" /></a>
							</dt>
							<dd class="pull-left">
								<p class="clearfix">
									<span class="topic-tag">
										<a href="/question/qdetail?id={{$max->id}}" class="text" data-id="2">{{$max->title}}</a>
									</span>
								</p>
								<p><b>{{$max->count}}</b> 个回复</p>
							</dd>
						</dl>
					</div>
				</div>	
				<div class="aw-mod aw-text-align-justify">
					<div class="mod-head">
						<a href="/question/hotpeople" class="pull-right">更多 &gt;</a>
						<h3>热门用户</h3>
					</div>
					<div class="mod-body">
						<dl>
							<dt class="pull-left aw-border-radius-5">
								<a href="/user/center?id={{$user->id}}"><img alt="" src="{{$user->profile}}" /></a>
							</dt>
							<dd class="pull-left">
								<a href="/user/center?id={{$user->id}}" data-id="3" class="aw-user-name">{{$user->username}}</a>
								<p class="signature"></p>
								<p><b>{{$user->rcount}}</b> 个问题, <b>{{$user->zcount}}</b> 次赞同</p>
							</dd>
						</dl>
					</div>
				</div>				
			<div class="aw-mod aw-text-align-justify" id="saybox"></div>
			<script type="text/javascript">
				$(function(){
					var scrtime;
					$("#quotation").hover(function(){
						clearInterval(scrtime);
					},function(){
						scrtime = setInterval(function(){
							var obj = $('#quotation ul li').last();
							obj.hide();
							$('#quotation ul').prepend(obj);
							$('#quotation ul li').first().slideDown(500);
						},5000);
					}).trigger("mouseleave");
				});
			</script>					

			<script type="text/javascript">
			$(function() {
				var fixfox="fixedff";
				var rollSet = $('#kuaiwwwad');/ 检查对象，#sidebar-tab是要随滚动条固定的ID，可根据需要更改
				var offset = rollSet.offset();
				$(window).scroll(function () {
					/ 检查对象的顶部是否在游览器可见的范围内/
					var scrollTop = $(window).scrollTop();
					if(offset.top < scrollTop + 380){
						rollSet.addClass(fixfox);
					}else{
						rollSet.removeClass(fixfox);
					}
				});
			});
			</script>				
				</div>
				<!-- end 侧边栏 -->
			</div>
		</div>
	</div>
</div>

@endsection